package leetcode;

public class Solution206 {
    public ListNode206 reverseList(ListNode206 head){
        ListNode206 pre = null;
        ListNode206 cur = head;
        while (cur != null){
            ListNode206 next = cur.next;
            cur.next = pre;
            pre = cur;
            cur = next;
        }
        return pre;
    }
}
